<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>业务员管理 - 销售业绩管理系统</title>
<style type="text/css">
<!--
.STYLE1 {	color: #FFFFFF;
	font-weight: bold;
	font-size: 12px;
}
.STYLE6 {font-size: 12px; }
.STYLE7 {font-size: 12px; background-color: #f5f5f5;margin:0;}
.STYLE8 {font-size: 12px; background-color: #ffffff;margin:0;}
body { 
margin:0;
}
-->
</style>
</head>

<body margin=0>

<table width="100%" bgcolor="#FFFFFF"  border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="28" class="STYLE7">业绩管理 &gt;业绩结算&gt;业绩信息浏览</td>
  </tr>
  <tr>
    <td valign="top"><table width="100%" align="center" bgcolor="#CCCCCC" >
      <tr>
        <td height="25" colspan="4" bordercolor="#000000" bgcolor="#1C94C4"><div align="center" class="STYLE1">业绩信息浏览</div></td>
      </tr>
	  
      <tr>
        <td height="22" colspan="2" bgcolor="#f5f5f5" class="STYLE7"><div align="right" class="STYLE6">
          <div align="left">&nbsp;业务员名称：</div>
        </div></td>
        <td height="22" colspan="2" bgcolor="#f5f5f5" class="STYLE7"><span class="STYLE6" id="salesman"></span></td>
      </tr>
	  
	   <tr style="display: none">
        <td width="31%" height="22" bgcolor="#f5f5f5" class="STYLE8"><div align="right" class="STYLE6">
          <div align="left">&nbsp;累计核销积分（左）：</div>
        </div></td>
        <td width="20%" bgcolor="#f5f5f5" class="STYLE8"><input type="text" id="lefttotalintegral"></input></td>
        <td width="30%" height="22" bgcolor="#F5F5F5" class="STYLE8">累计核销积分（右）：</td>
        <td width="19%" bgcolor="#F5F5F5" class="STYLE8"><input type="text" id="righttotalintegral"></input></td>
	   </tr>
	  <tr>
        <td height="22" bgcolor="#f5f5f5" class="STYLE8"><div align="right" class="STYLE6">
          <div align="left">&nbsp;有效发展新店数：</div>
        </div></td>
        <td height="22" bgcolor="#f5f5f5" class="STYLE8" id="totalshop"></td>
        <td height="22" bgcolor="#F5F5F5" class="STYLE8">有效结算轮数：</td>
        <td height="22" bgcolor="#F5F5F5" class="STYLE8"><input type="text" id="allcount"></input></td>
	  </tr>
	  <tr>
        <td height="22" bgcolor="#f5f5f5" class="STYLE8"><div align="right" class="STYLE6">
          <div align="left">&nbsp;累计结算积分（左）：</div>
        </div></td>
        <td height="22" bgcolor="#f5f5f5" class="STYLE8"><input type="text" id="LeftFinalIntegral"></input></td>
        <td height="22" bgcolor="#F5F5F5" class="STYLE8">累计结算积分（右）：</td>
        <td height="22" bgcolor="#F5F5F5" class="STYLE8"><input type="text" id="RightFinalIntegral"></input></td>
	  </tr>
	  <tr>
        <td height="22" bgcolor="#f5f5f5" class="STYLE8"><div align="right" class="STYLE6">
          <div align="left">&nbsp;结算剩余积分（左）：</div>
        </div></td>
        <td height="22" bgcolor="#f5f5f5" class="STYLE8" id="thisleftintegral"></td>
        <td height="22" bgcolor="#F5F5F5" class="STYLE8">结算剩余积分（右）：</td>
        <td height="22" bgcolor="#F5F5F5" class="STYLE8" id="thisrightintegral"></td>
	  </tr>
      <tr>
        <td height="25" colspan="4" bgcolor="#1C94C4"><div align="center" class="STYLE6">
            <form action="" method="post" name="form1" id="form1">
            <label>
              <input type="button" name="Submit" value="提交" onclick="submitinfo()"/>
              </label>
              <label>
              <input type="submit" name="Submit" value="关闭" onclick="winclose()"/>
              </label>
            </form>
        </div></td>
      </tr>
    </table></td>
  </tr>
</table>
<script type="text/javascript" src="../js/jquery-1.11.1.min.js"></script>
<script language="javascript">
function winclose(){
window.close();
}
var url = window.location + "";
var id = url.substring(url.indexOf("?id=") + 4, url.length);
$.get("../verification/integralinfo",{id:id},function(json){
	$("#salesman").empty().append(json["SalesmanName"]);
	$("#lefttotalintegral").prop("value",json["SELFTotalLeftIntegral"]);
	$("#righttotalintegral").prop("value",json["SELFTotalRightIntegral"]);
	$("#totalshop").empty().append(json["SELFTotalShop"]);
	$("#allcount").prop("value",json["SELFTotalCount"]);
	$("#LeftFinalIntegral").prop("value",json["SELFTotalUsedLeftIntegral"]);
	$("#RightFinalIntegral").prop("value",json["SELFTotalUsedRightIntegral"]);
	//$("#thisleftintegral").empty().append(parseInt(json["SELFTotalLeftIntegral"]) - parseInt(json["SELFTotalUsedLeftIntegral"]));
	//$("#thisrightintegral").empty().append(parseInt(json["SELFTotalRightIntegral"]) - parseInt(json["SELFTotalUsedRightIntegral"]));
	$("#thisleftintegral").empty().append(parseInt(json["LeftIntegral"]));
	$("#thisrightintegral").empty().append(parseInt(json["RightIntegral"]));

});
function submitinfo(){
	$.post("../verification/addinfo",{
			id:id,
			allcount:$("#allcount").val(),
			lefttotalintegral:$("#lefttotalintegral").val(),
			righttotalintegral:$("#righttotalintegral").val(),
			leftfinalintegral:$("#LeftFinalIntegral").val(),
			rightfinalintegral:$("#RightFinalIntegral").val()
		},function(json){
			if(json)
				window.close();
		});
}
</script>
</body>
</html>
